package com.education.welco.service.impl;

import java.util.List;

import com.education.common.utils.Convert;
import com.education.welco.mapper.SCatalogClassTeaMapper;
import com.education.welco.pojo.SCatalogClassTea;
import com.education.welco.service.ISCatalogClassTeaService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * 备课在授班级 服务层实现
 *
 * @author d
 * @date 2020-05-09
 */
@Service
public class SCatalogClassTeaServiceImpl implements ISCatalogClassTeaService {

    @Autowired
    private SCatalogClassTeaMapper sCatalogClassTeaMapper;


    /**
     * 查询备课在授班级信息
     *
     * @param catalogId 备课在授班级ID
     * @return 备课在授班级信息
     */
    @Override
    public List<SCatalogClassTea> selectSCatalogClassTeaByCatalogId(Integer catalogId) {
        return sCatalogClassTeaMapper.selectSCatalogClassTeaByCatalogId(catalogId);
    }

    /**
     * 查询备课在授班级信息
     *
     * @param id 备课在授班级ID
     * @return 备课在授班级信息
     */
    @Override
    public SCatalogClassTea selectSCatalogClassTeaById(Integer id) {
        return sCatalogClassTeaMapper.selectSCatalogClassTeaById(id);
    }

    /**
     * 查询备课在授班级列表
     *
     * @param sCatalogClassTea 备课在授班级信息
     * @return 备课在授班级集合
     */
    @Override
    public List<SCatalogClassTea> selectSCatalogClassTeaList(SCatalogClassTea sCatalogClassTea) {
        return sCatalogClassTeaMapper.selectSCatalogClassTeaList(sCatalogClassTea);
    }

    /**
     * 新增备课在授班级
     *
     * @param sCatalogClassTea 备课在授班级信息
     * @return 结果
     */
    @Override
    public int insertSCatalogClassTea(SCatalogClassTea sCatalogClassTea) {
        return sCatalogClassTeaMapper.insertSCatalogClassTea(sCatalogClassTea);
    }

    /**
     * 修改备课在授班级
     *
     * @param sCatalogClassTea 备课在授班级信息
     * @return 结果
     */
    @Override
    public int updateSCatalogClassTea(SCatalogClassTea sCatalogClassTea) {
        return sCatalogClassTeaMapper.updateSCatalogClassTea(sCatalogClassTea);
    }

    /**
     * 删除备课在授班级
     *
     * @param catalogId 备课在授班级ID
     * @return 结果
     */
    @Override
    public int deleteSCatalogClassTeaByCatalogIdAndClassId(Integer catalogId, Integer classId) {
        return sCatalogClassTeaMapper.deleteSCatalogClassTeaByCatalogIdAndClassId(catalogId,classId);
    }

    /**
     * 删除备课在授班级
     *
     * @param id 备课在授班级ID
     * @return 结果
     */
    @Override
    public int deleteSCatalogClassTeaByCatalogId(Integer id) {
        return sCatalogClassTeaMapper.deleteSCatalogClassTeaByCatalogId(id);
    }

    /**
     * 删除备课在授班级对象
     *
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deleteSCatalogClassTeaByIds(String ids) {
        return sCatalogClassTeaMapper.deleteSCatalogClassTeaByIds(Convert.toStrArray(ids));
    }
}